import { zeroTwo } from "./common"

export const data00 = [
	[{
		value: "客户类型",
		width: 248,
		align: "left"
	}, {
		value: "次数",
		width: 198
	}, {
		value: "机构数",
		width: 180
	}],
	[{
		value: "银行汇总",
		width: 248,
		align: "left"
	}, {
		value: 0,
		width: 198
	}, {
		value: 0,
		width: 180
	}],
	[{
		value: "传统银行",
		width: 248,
		align: "left"
	}, {
		value: 0,
		width: 198
	}, {
		value: 0,
		width: 180
	}]
]
export const data01 = [
	[{
		value: "机构类型",
		width: 122
	}, {
		value: "7天",
		width: 80
	}, {
		value: "15天",
		width: 80
	}, {
		value: "1月",
		width: 80
	}, {
		value: "3月",
		width: 80
	}, {
		value: "6月",
		width: 80
	}, {
		value: "1年",
		width: 80
	}],
	[{
		value: "网络小贷",
		width: 122,
		fontWeight: "bold"
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}],
	[{
		value: "汽车金融",
		width: 122,
		fontWeight: "bold"
	}, {
		value: 0,
		width: 80
	}, {
		value: "0",
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}],
	[{
		value: "小贷",
		width: 122,
		fontWeight: "bold"
	}, {
		value: 0,
		width: 80
	}, {
		value: "0",
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}],
	[{
		value: "消费金融",
		width: 122,
		fontWeight: "bold"
	}, {
		value: 0,
		width: 80
	}, {
		value: "0",
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}],
	[{
		value: "融资租赁",
		width: 122,
		fontWeight: "bold"
	}, {
		value: 0,
		width: 80
	}, {
		value: "0",
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}],
	[{
		value: "其它",
		width: 122,
		fontWeight: "bold"
	}, {
		value: 0,
		width: 80
	}, {
		value: "0",
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}, {
		value: 0,
		width: 80
	}]
]
export const data02 = [
	[{
		value: "当前是否逾期",
		width: 120
	}, {
		value: "当前逾期机构数",
		width: 120
	}, {
		value: "当前逾期金额",
		width: 120
	}],
	[{
		value: "未命中",
		width: 120,
		color: "#E40032"
	}, {
		value: "未命中",
		width: 120,
		color: "#E40032"
	}, {
		value: "未命中",
		width: 120,
		color: "#E40032"
	}],

]
export const data03 = [
	[{
		value: "货款总机构数",
		width: 120
	}, {
		value: "贷款已结清机构数",
		width: 120
	}, {
		value: "信用贷款时长",
		width: 120
	}],
	[{
		value: "未命中",
		width: 120,
		color: "#E40032"
	}, {
		value: "未命中",
		width: 120,
		color: "#E40032"
	}, {
		value: "未命中",
		width: 120,
		color: "#E40032"
	}],
]
export const data04 = [
	[{
		value: "历史成功扣款笔数",
		width: 120
	}, {
		value: "历史失败扣款笔数",
		width: 120
	}, {
		value: "最后一次成功还款距今",
		width: 120
	}],
	[{
		value: "未命中",
		width: 120,
		color: "#E40032"
	}, {
		value: "未命中",
		width: 120,
		color: "#E40032"
	}, {
		value: "未命中",
		width: 120,
		color: "#E40032"
	}],
]
export const data05 = [
	[{
		value: "最后一天是否有新增逾期",
		width: 120
	}, {
		value: "最近7天是否有新增逾期",
		width: 120
	}, {
		value: "最近14天是否有新增逾期",
		width: 120
	}],
	[{
		value: "未命中",
		width: 120,
		color: "#E40032"
	}, {
		value: "未命中",
		width: 120,
		color: "#E40032"
	}, {
		value: "未命中",
		width: 120,
		color: "#E40032"
	}],
]
export const dataLybx = [ '未命中',  '未命中', '未命中', '未命中', '未命中', '未命中', '未命中', '未命中', '未命中']
export const data06 = [
	[{
		value: "时间",
		width: 80,
		align: "left"
	}, {
		value: "1天",
		width: 60
	}, {
		value: "7天",
		width: 60
	}, {
		value: "14天",
		width: 60
	}, {
		value: "30天",
		width: 60
	}],
	[{
		value: "逾期状态",
		width: 80,
		align: "left",
		fontWight: "bold"
	}, {
		value: "未命中",
		width: 60
	}, {
		value: "未命中",
		width: 60
	}, {
		value: "未命中",
		width: 60
	}, {
		value: "未命中",
		width: 60
	}],
]
export const data10 = [
	[{
		value: "时间",
		width: 80,
		align: "left"
	}, {
		value: "7天",
		width: 60
	}, {
		value: "14天",
		width: 60
	}, {
		value: "21天",
		width: 60
	}, {
		value: "30天",
		width: 60
	}],
	[{
		value: "交易失败总金额",
		width: 80,
		align: "left",
		fontWight: "bold"
	}, {
		value: 0,
		width: 60
	}, {
		value: 0,
		width: 60
	}, {
		value: 0,
		width: 60
	}, {
		value: 0,
		width: 60
	}],
	[{
		value: "还款成功总金额",
		width: 80,
		align: "left",
		fontWight: "bold"
	}, {
		value: 0,
		width: 60
	}, {
		value: 0,
		width: 60
	}, {
		value: 0,
		width: 60
	}, {
		value: 0,
		width: 60
	}],
	[{
		value: "最近还款成功笔数",
		width: 80,
		align: "left",
		fontWight: "bold"
	}, {
		value: 0,
		width: 60
	}, {
		value: 0,
		width: 60
	}, {
		value: 0,
		width: 60
	}, {
		value: 0,
		width: 60
	}],
	[{
		value: "最近交易失败笔数",
		width: 80,
		align: "left",
		fontWight: "bold"
	}, {
		value: 0,
		width: 60
	}, {
		value: 0,
		width: 60
	}, {
		value: 0,
		width: 60
	}, {
		value: 0,
		width: 60
	}],
]
export const data101 = [
	[{
		value: "行为类型",
		width: 248,
		align: "left"
	}, {
		value: "命中次数",
		width: 198
	}, {
		value: "时间",
		width: 180
	}],
	[{
		value: "银行逾期失联风险",
		width: 248,
		align: "left"
	}, {
		value: 0,
		width: 198
	}, {
		value: '无',
		width: 180
	}],
	[{
		value: "银行90天内逾期",
		width: 248,
		align: "left"
	}, {
		value: 0,
		width: 198
	}, {
		value: '无',
		width: 180
	}],
	[{
		value: "银行90天以上逾期",
		width: 248,
		align: "left"
	}, {
		value: 0,
		width: 198
	}, {
		value: '无',
		width: 180
	}]
]
export const data60 = [
	[{
		value: "行为类型",
		width: 248,
		align: "left"
	}, {
		value: "命中次数",
		width: 198
	}, {
		value: "时间",
		width: 180
	}],
	[{
		value: "非银",
		width: 248,
		align: "left"
	}, {
		value: 0,
		width: 198
	}, {
		value: '无',
		width: 180
	}],
	[{
		value: "持牌小贷",
		width: 248,
		align: "left"
	}, {
		value: 0,
		width: 198
	}, {
		value: '无',
		width: 180
	}],
	[{
		value: "网络小贷",
		width: 248,
		align: "left"
	}, {
		value: 0,
		width: 198
	}, {
		value: '无',
		width: 180
	}],
	[{
		value: "汽车金融",
		width: 248,
		align: "left"
	}, {
		value: 0,
		width: 198
	}, {
		value: '无',
		width: 180
	}],
	[{
		value: "消费金融",
		width: 248,
		align: "left"
	}, {
		value: 0,
		width: 198
	}, {
		value: '无',
		width: 180
	}],
	[{
		value: "融资租赁",
		width: 248,
		align: "left"
	}, {
		value: 0,
		width: 198
	}, {
		value: '无',
		width: 180
	}],
	[{
		value: "其它金融",
		width: 248,
		align: "left"
	}, {
		value: 0,
		width: 198
	}, {
		value: '无',
		width: 180
	}]
]

export const com41 = [
	[{
		value: "排名",
		width: 140
	}, {
		value: "供应商名称",
		width: 140
	}, {
		value: "采购额（元）",
		width: 140
	}, {
		value: "金额占比（%）",
		width: 140
	}, {
		value: "是否关联方",
		width: 140
	}],
	[{
		value: "",
		width: 140
	}, {
		value: "",
		width: 140
	}, {
		value: "",
		width: 140
	}, {
		value: "",
		width: 140
	}, {
		value: "",
		width: 140
	}]

]
export const com42 = [
	[{
		value: "排名",
		width: 140
	}, {
		value: "供应商名称",
		width: 140
	}, {
		value: "采购额（元）",
		width: 140
	}, {
		value: "金额占比（%）",
		width: 140
	}, {
		value: "是否关联方",
		width: 140
	}],
	[{
		value: "",
		width: 140
	}, {
		value: "",
		width: 140
	}, {
		value: "",
		width: 140
	}, {
		value: "",
		width: 140
	}, {
		value: "",
		width: 140
	}]

]
export function makeCom4(QI) {
	var item = [{
		value: "",
		width: 140
	}, {
		value: "",
		width: 140
	}, {
		value: "",
		width: 140
	}, {
		value: "",
		width: 140
	}, {
		value: "",
		width: 140
	}]


}

export const com11 = [
	[
		['zsxm', '征收项目'],
		['zspm', '征收品目'],
		['zsxmDm', '征收项目代码'],
		['sbqx', '申报日期'],
		['sssqq', ' 税 款 所 属 期 起'],
		['sssqz', ' 税 款 所 属 期 止'],
		['ynse', '应纳税额'],
		['jmse', '减免税额'],
		['yjse', '预缴税额'],
		['qbxse', '全部销售额'],
		['xse', '销售额'],
		['sbrq', '申报日期'],
		['ybtse', '应补退税额'],
		['msxse', '免税销售额'],
	],
	[
		['ajmc', '案件名'],
		['djrq', '等级日期'],
		['jcssqq', '税款所属期起'],
		['jcssqz', '税款所属期止'],
		['jclx', '稽查类'],
		['ajzt', '案件状态'],
		['ajclyj', '案件处理意见'],
		['nsrqrzj', '纳税人确认状态'],
		['ajclyjdm', '案件处理意见代码'],
		['jcztdm', '稽查状态代码'],
		['ajlymc', '案件来源名称'],
		['ajlydm', '案件来源代码'],
		['wfwzlxmc', '违法违章类型名称'],
		['wfwzlxdm', '违法违章类型代码']
	],
	[
		['d_project', '申报项目'],
		['declara_date', '申报日期'],
		['payment_endtime', '税款所'],
		['payment_starttime', '税款'],
		['taxpay_amount', '应纳税额'],
		['taxpay_savings', '减免税额'],
		['tax_sale_amount', '销售收入'],
		['pre_taxpay_amount', '预缴税额'],
		['total_sale_amount', '全部销售额'],
		['tax_refund_amount', '应补退税额'],
		['dItem', '征收项目'],
		['yjse', '预缴税额'],
		['qbxse', '全部销售额'],
		['sbqx', '申报期限'],
		['msxse', '免税销售额'],
		['bqmse', '本期免税额'],
		['bqyjnse', '本期已缴纳税额'],
		['declara_table_name', '申报表名称'],
		['xse', '应税销售收入']
	],
	[
		['total', '累计'],
		['taxDeclareAmountTb', '应税销售收入年度同比'],
		['year', '年份']
	],
	[
		['d_project', '申报项目'],
		['declara_date', '申报日期'],
		['payment_endtime', '税款所'],
		['payment_starttime', '税款'],
		['taxpay_amount', '应纳税额'],
		['taxpay_savings', '减免税额'],
		['tax_sale_amount', '销售收入'],
		['pre_taxpay_amount', '预缴税额'],
		['total_sale_amount', '全部销售额'],
		['tax_refund_amount', '应补退税额'],
		['dItem', '征收项目'],
		['yjse": ,//预缴税额'],
		['qbxse', '全部销售额'],
		['sbqx', '申报期限'],
		['msxse', '免税销售额'],
		['bqmse', '本期免税额'],
		['bqyjnse', '本期已缴纳税额'],
		['declara_table_name', '申报表名称'],
		['xse', '应税销售收入']
	],
	[
		['illegal_fact', ' 违法'],
		['sswflx', '税收违法类型码值，参见违'],
		['sswfxwclzt', '税收违法行为处理状态码'],
		['sswfsd', ' 税收违法手段码值'],
		['r_data', '登记日期'],
		['start_at', ' 所 属 期 间 起'],
		['end_at', ' 所 属 期 间 止'],
		['status_tax_illegal', '案件状态'],
		['lxmc', '违法违章类型名称'],
		['sdmc', '违法违章手段'],
		['clzt', '处理状态']
	],
	[
		['skssqq', '税款所属期起'],
		['skssqz', '税款所属期止'],
		['zsxmmc', '征收项目'],
		['zspmmc', '征收品目'],
		['skzlmc', '税款种类'],
		['ynse', '应纳税额'],
		['ybtse', '应(补)退税额'],
		['jkqx', '缴款期限'],
		['yjskztmc', '应缴税状态'],
		['skjndz":  //税款缴纳地址'],
		['yzpzzlmc', '应征品种类'],
		['skzlDm', '税款种类代码'],
		['yyje', '已缴税额'],
	],
	[
		['changeContentBefore', '变更前内容'],
		['changeCode', '变更项目代码'],
		['changeContentAfter', '变更后内容'],
		['sprq', '变更时间'],
		['changeItem', '变更项目名称']
	],
	[
		['dProject', '申报项目'],
		['declaraDate', '申报日期'],
		['taxpayAmount', '应纳税额'],
		['taxpaySavings', '减免税额']
	],
	[
		['appraisal_year', '评价年度'],
		['evaluation_result', '评价结果'],
		['evaluation_score', '评价得分']
	],
	[
		['sssqQ', ' 所 属 时 期 起'],
		['sssqZ', ' 所 属 时 期 止'],
		['qbxse', '全部销售额'],
		['xse', '应税销售额'],
		['declara_date', '申报日期'],
		['asysljsxse', '按适用税率计税销售额'],
		['ajybfjsxse', '按简易办法计税销售额'],
		['mdtbfckxse', '免、抵、退办法出口销售'],
		['xxse', '销项税额（一般纳税人特有）'],
		['jxse', '进项税额（一般纳税人特有）'],
		['jyjsbfynse', '简易计税办法计算的应'],
		['msxse', '免税销售额'],
		['yzzzsbhxse_3', '应征增值税不含税销售额（3%征收率）'],
		['yzzzsbhxse_5', '应征增值税不含税销售额（5%征收率）'],
		['xxsygdzcbhxse', '销售使用过的固定资产不含税销售额'],
		['ckmsxse', '出口免税销售额'],
		['ynsehj', '应纳税额合计'],
		['ybtse', '应补退税额'],
		['yjse', '预缴税额'],
		['sbqx', '申报期限']
	],
	[
		['dsfjgmc', '银行名称'],
		['slzt', '状态'],
		['sqrq', '申请（授信）日期'],
		['dkye', '贷款余额'],
		['dkje', '贷款金额'],
		['jrcpmc', '产品名称'],
		['sxed', '授信额度'],
		['yyms', '授信失败原因']
	],
]
export const com21 = [
	[
		["sssqq", "税款所属期起"],
		["sssqz", "税款所属期止"],
		["sbrq", "申报日期"],
		["season", "季度"],
	],
	[
		["year", "年份"],
		["chzzl", "存货周转率"],
		["chzzts", "存货周转天数"],
		["fxjlys", "经营活动现金"],
		["jlr", "净利润"],
		["jlrzzl", "净利润增长率"],
		["jzcsyl", "净资产收益率"],
		["jzczzl", "净资产增长率"],
		["ldbl", "流动比率"],
		["ldzczzl", "流动资产周转率"],
		["mlr", "毛利润(元)"],
		["mll", "营业毛利率"],
		["jll", "净利润率"],
		["pczs", "破产指数"],
		["sdbl", "速动比率"],
		["srzzl", "营业收入增长率"],
		["xjldfzb", "现金流动负债比"],
		["yfpjzzts", "应付票据周转天数"],
		["yfzkzzts", "预付账款周转天数"],
		["yfzkzzts2", "应付账款周转天数"],
		["yhlxbs", "已获利息倍数"],
		["yspjzzts", "应收票据周转天数数程)增长率"],
		["yszkzzl", "应收账款周转率"],
		["yszkzzts", "应收账款周转天"],
		["yszkzzts2", "预收账款周转天数"],
		["yycb", "营业成本(元)"],
		["yylrl", "营业利润率"],
		["yylrzzl", "营业利润增长率"],
		["yysr", "营业收入(元)"],
		["yyzjzzcs", "营运资金周转次数"],
		["yyzq", "营业周期(天)"],
		["zcfzl", "资产负债率"],
		["zczjzzl", "总资产周转率"],
		["zyxjl", "自由现金流"],
		["zzczzl", "总资产增长率"],
		["gdzczzl", "(固定资产+在建工程)增长率"],
		["gxfzb", "钢性负债比"]
	],
]
export const com31 = [
	[
		["month", "统计月份"],
		["gmfSl", " 下游经销商数量(个)"],
		["jyjeXy", " 下游经销商交易金额(元)不含税(元)"],
		["jyzsXy", " 下游经销商交易次数"],
		["xsfSl", " 上游供应商数量(个)"],
		["jyjeSy", " 上游供应商交易金额"],
		["jyzsSy", " 上游供应商交易次数(次)"],
		["jyjetaxXy", " 下游经销商交易税额(元)"]
	],
	[
		["nd", "年度"],
		["gmfSl", " 下游经销商数量(个)"],
		["jyjeXy", " 下游经销商交易金额(元)不含税(元)"],
		["jyzsXy", " 下游经销商交易次数"],
		["xsfSl", " 上游供应商数量(个)"],
		["jyjeSy", " 上游供应商交易金额"],
		["jyzsSy", " 上游供应商交易次数(次)"],
		["jyjetaxXy", " 下游经销商交易税额(元)"]
	],
	[
		["negativeAmount", "进项冲红票金额合计"],
		["negativeCount", "进项冲红票张数合计"],
		["normalAmount", "进项有效票金额合计"],
		["normalTaxAmount", "进项有效票税额合计"],
		["normalCount", "进项有效票张数合计"],
		["totalAmount", "进项金额"],
		["totalCount", "进项张数"],
		["voidedAmount", "进项作废票金额合计"],
		["voidedCount", "进项作废票张数合计"],
		["yearMonth", "年月"],
		["normalTaxIncomeAmount", " 应税销售收入合计"],
		["totalSupplier", " 供应商数量"],
		["rateNegativeAmount", " 冲红作废金额比"]
	],
	[
		["totalAmount", "金额合计"],
		["negativeAmount", "冲红票额合计"],
		["negativeCount", "冲红张数合计"],
		["normalTaxSaleAmount", "有效票应税销售"],
		["normalAmount", "有效票金额合计额合计"],
		["normalCount", "有效票张数合计"],
		["normalTaxAmount", "有效票税"],
		["rateIntegerAmount", "开票金额为整数的发票金额占比（%）"],
		["rateIntegerCount", "开票金额为整数的发票张数占比（%）"],
		["voidedAmount", "作废票额合计"]
	],

]
export function ctjgsq(data) {
	let jglbtj = [
		['bank', ''],
		['bank', 'tra_']
	]
	let time_crecle = ['d7', 'd15', 'm1', 'm3', 'm6', 'm12']
	let tj = []
	for (let i = 0; i < time_crecle.length; i++) {
		let jglbtjItem = []
		const item = data[time_crecle[i]]
		for (let j = 0; j < jglbtj.length; j++) {
			let allsum = 0,
				orgsum = 0
			allsum += deepData(item, ['id', jglbtj[j][0], jglbtj[j][1] + 'allnum'])
			allsum += deepData(item, ['cell', jglbtj[j][0], jglbtj[j][1] + 'allnum'])
			orgsum += deepData(item, ['id', jglbtj[j][0], jglbtj[j][1] + 'orgnum'])
			orgsum += deepData(item, ['cell', jglbtj[j][0], jglbtj[j][1] + 'orgnum'])
			jglbtjItem.push([allsum, orgsum])
		}
		tj.push(jglbtjItem)
	}
	return tj
}

export const ctjgTemData = [
	[
		[4, 2],
		[2, 1]
	],
	[
		[6, 4],
		[4, 2]
	],
	[
		[8, 6],
		[4, 4]
	],
	[
		[9, 7],
		[8, 6]
	],
	[
		[10, 8],
		[9, 6]
	],
	[
		[16, 10],
		[10, 8]
	]
]

export function qtjgsq(data) {
	let jglbtj = [
		['nbank', 'nsloan_'],
		['nbank', 'autofin_'],
		['nbank', 'mc_'],
		['nbank', 'cons_'],
		['nbank', 'finlea_'],
		['nbank', 'oth_']
		// ['nbank', 'sloan_'],
		// ['nbank', 'p2p_'],
		// ['nbank', 'ca_'],
		// ['nbank', 'cf_'],
		// ['nbank', 'com_']
	]
	let time_crecle = ['d7', 'd15', 'm1', 'm3', 'm6', 'm12']
	let tj = []
	for (let i = 0; i < time_crecle.length; i++) {
		let jglbtjItem = []
		const item = data[time_crecle[i]]
		// console.log('--item--', item)
		for (let j = 0; j < jglbtj.length; j++) {
			let allsum = 0,
				orgsum = 0
			orgsum += deepData(item, ['id', jglbtj[j][0], jglbtj[j][1] + 'orgnum'])
			orgsum += deepData(item, ['cell', jglbtj[j][0], jglbtj[j][1] + 'orgnum'])
			allsum += deepData(item, ['id', jglbtj[j][0], jglbtj[j][1] + 'allnum'])
			allsum += deepData(item, ['cell', jglbtj[j][0], jglbtj[j][1] + 'allnum'])
			jglbtjItem.push([orgsum, allsum])
		}
		tj.push(jglbtjItem)
	}

	tj = transposeArray(tj)

	for (let i = 0; i < tj.length; i++) {
		for (let j = 0; j < tj[i].length; j++) {
			data01[i + 1][j + 1].value = tj[i][j][1]
		}
	}
	return data01
}

export function dktjRow(jxzs) {

	data02[1][0].value = jxzs.xyp_cpl0044 == '1' ? '逾期' : jxzs.xyp_cpl0044 == '0' ? '未逾期' : '未命中'
	data02[1][1].value = jxzs.xyp_cpl0071 == '1' ? '1-2' : jxzs.xyp_cpl0071 == '2' ? '2-4' : jxzs.xyp_cpl0071 ==
		'3' ? '大于4' : '暂无'
	data02[1][2].value = jxzs.xyp_cpl0072 == '1' ? '0-800' : jxzs.xyp_cpl0072 == '2' ? '800-2000' : jxzs
		.xyp_cpl0072 == '3' ? '2000-3000' :
		jxzs.xyp_cpl0072 == '4' ? '3000-5000' : jxzs.xyp_cpl0072 == '5' ? '5000-7000' : jxzs.xyp_cpl0072 ==
		'6' ?
		'7000-1800' :
		jxzs.xyp_cpl0072 == '7' ? '大于1800' : '无'

	data03[1][0].value = jxzs.xyp_cpl0001 == '1' ? '0-9' : jxzs.xyp_cpl0001 == '2' ? '9-14' : jxzs
		.xyp_cpl0001 ==
		'3' ? '大于14' : '无'
	data03[1][1].value = jxzs.xyp_cpl0002 == '1' ? '0-5' : jxzs.xyp_cpl0002 == '2' ? '5-9' : jxzs.xyp_cpl0002 ==
		'3' ? '9- 14' : jxzs.xyp_cpl0002 == '4' ? '14-17' : jxzs.xyp_cpl0002 == '5' ? '大于17' : '未命中'
	data03[1][2].value = jxzs.xyp_cpl0045 == '1' ? '0- 220)天' : jxzs.xyp_cpl0045 == '2' ? '220-450)天' : jxzs
		.xyp_cpl0045 == '3' ? '450-520)天' : jxzs.xyp_cpl0045 == '4' ? '大于520天' : '未命中'


	data04[1][0].value = jxzs.xyp_cpl0014 == '1' ? '0-2' : jxzs.xyp_cpl0014 == '2' ? '2-10' : jxzs
		.xyp_cpl0014 ==
		'3' ? '10-34' :
		jxzs.xyp_cpl0014 == '4' ? '34- 60' : jxzs.xyp_cpl0014 == '5' ? '大于60' : '未命中'
	data04[1][1].value = jxzs.xyp_cpl0015 == '1' ? '0-3' : jxzs.xyp_cpl0015 == '2' ? '3-5' : jxzs.xyp_cpl0015 ==
		'3' ? '5-10' :
		jxzs.xyp_cpl0015 == '4' ? '大于10' : '未命中'


	data04[1][2].value = jxzs.xyp_cpl0068 == '1' ? '0-5)天' : jxzs.xyp_cpl0068 == '2' ? '5-50)天' : jxzs
		.xyp_cpl0068 ==
		'3' ? '50-140)天' :
		jxzs.xyp_cpl0068 == '4' ? '大于140天' : '未命中'
	data05[1][0].value = jxzs.xyp_cpl0028 == '1' ? '有' : jxzs.xyp_cpl0028 == '0' ? '无' : '未命中'
	data05[1][1].value = jxzs.xyp_cpl0029 == '1' ? '有' : jxzs.xyp_cpl0029 == '0' ? '无' : '未命中'
	data05[1][2].value = jxzs.xyp_cpl0030 == '1' ? '有' : jxzs.xyp_cpl0030 == '0' ? '无' : '未命中'
	// console.log('data02',data02[1])
	// console.log('data03',data03[1])
	// console.log('data04',data04[1])
	// console.log('data05',data05[1])
}

export function sxxzRow(jxzs) {
	data06[1][1].value = jxzs.xyp_cpl0028 == '1' ? '逾期' : jxzs.xyp_cpl0028 == '0' ? '未逾期' : '未命中'
	data06[1][2].value = jxzs.xyp_cpl0029 == '1' ? '逾期' : jxzs.xyp_cpl0028 == '0' ? '未逾期' : '未命中'
	data06[1][3].value = jxzs.xyp_cpl0030 == '1' ? '逾期' : jxzs.xyp_cpl0030 == '0' ? '未逾期' : '未命中'
	data06[1][4].value = jxzs.xyp_cpl0031 == '1' ? '逾期' : jxzs.xyp_cpl0031 == '0' ? '未逾期' : '未命中'
}

export function lybxRow(jxzs) {
	dataLybx[0] = jxzs.xyp_cpl0001 == '1' ? '0-9' : jxzs.xyp_cpl0001 == '2' ? '9-14' : jxzs.xyp_cpl0001 == '3' ?
		'大于14' : '未命中'
	dataLybx[1] = jxzs.xyp_cpl0002 == '1' ? '0-5' : jxzs.xyp_cpl0002 == '2' ? '5-9' : jxzs.xyp_cpl0002 == '3' ?
		'9- 14' : jxzs.xyp_cpl0002 == '4' ? '14-17' : jxzs.xyp_cpl0002 == '5' ? '大于17' : '未命中'
	dataLybx[2] = jxzs.xyp_cpl0007 == '1' ? '0-1' : jxzs.xyp_cpl0007 == '2' ? '1-2' : jxzs.xyp_cpl0007 == '3' ?
		'2- 4' : jxzs.xyp_cpl0007 == '4' ? '大于4' : '未命中'
	dataLybx[3] = jxzs.xyp_cpl0008 == '1' ? '0-1' : jxzs.xyp_cpl0008 == '2' ? '1-5' : jxzs.xyp_cpl0008 == '3' ?
		'5- 11' : jxzs.xyp_cpl0008 == '4' ? '大于11' : '未命中'
	dataLybx[4] = disEdata(jxzs.xyp_t02aczzza_aczzzz) * 80 + '%'
	dataLybx[5] = disEdata(jxzs.xyp_t02cczzzc_cczzzz) * 80 + '%'
	dataLybx[6] = jxzs.xyp_t02dezezz_dezzzz == '1' ? '0-1' : jxzs.xyp_t02dezezz_dezzzz == '2' ? '大于1' : '无'
	dataLybx[7] = jxzs.xyp_t02dezfzz_dezzzz == '1' ? '0-1' : jxzs.xyp_t02dezfzz_dezzzz == '2' ? '大于1' : '无'
	dataLybx[8] = jxzs.xyp_t02dezgzz_dezzzz == '1' ? '0-1' : jxzs.xyp_t02dezgzz_dezzzz == '2' ? '大于1' : '无'
}

export function disEdata(data) {
	if (data == undefined || data == null || data == '') {
		return 0
	} else {
		return zeroTwo(data)
	}
}

export function xwtz10Row(jxzs) {
	data10[1][1].value = jxzs.xyp_cpl0034 == '1' ? '0-2000' : jxzs.xyp_cpl0034 == '2' ? '2000-8000' : jxzs
		.xyp_cpl0034 == '3' ? '8000-17000' : jxzs.xyp_cpl0034 == '4' ? '17000-26000' : jxzs.xyp_cpl0034 ==
		'5' ?
		'大于26000' : '未命中'
	data10[1][2].value = jxzs.xyp_cpl0036 == '1' ? '0-800' : jxzs.xyp_cpl0036 == '2' ? '800-4000' : jxzs
		.xyp_cpl0036 == '3' ? '4000-9000' : jxzs.xyp_cpl0036 == '4' ? '9000-30000' : jxzs.xyp_cpl0036 == '5' ?
		'大于30000' : '未命中'

	data10[1][3].value = jxzs.xyp_cpl0066 == '1' ? '0-800' : jxzs.xyp_cpl0066 == '2' ? '800-2000' : jxzs
		.xyp_cpl0066 == '3' ? '2000-30000' : jxzs.xyp_cpl0066 == '4' ? '30000-50000' : jxzs.xyp_cpl0066 == '5' ?
		'大于50000' : '未命中'

	data10[1][4].value = jxzs.xyp_cpl0038 == '1' ? '0-6000' : jxzs.xyp_cpl0038 == '2' ? '6000-8000' : jxzs
		.xyp_cpl0038 == '3' ? '8000-50000' : jxzs.xyp_cpl0038 == '4' ? '50000-50000' : '未命中'

	data10[2][1].value = jxzs.xyp_cpl0035 == '1' ? '0-2000' : jxzs.xyp_cpl0035 == '2' ? '2000-17000' : jxzs
		.xyp_cpl0035 == '3' ? '大于17000' : '未命中'

	data10[2][2].value = jxzs.xyp_cpl0037 == '1' ? '0-9000' : jxzs.xyp_cpl0037 == '2' ? '9000-3800' : jxzs
		.xyp_cpl0037 == '3' ? '大于3800' : '未命中'

	data10[2][3].value = jxzs.xyp_cpl0067 == '1' ? '0-800' : jxzs.xyp_cpl0067 == '2' ? '800-34000' : jxzs
		.xyp_cpl0067 == '3' ? '大于34000' : '未命中'

	data10[2][4].value = jxzs.xyp_cpl0039 == '1' ? '0-8000' : jxzs.xyp_cpl0039 == '2' ? '8000-36000' : jxzs
		.xyp_cpl0039 == '3' ? '大于36000' : '未命中'

	data10[3][1].value = jxzs.xyp_cpl0019 == '1' ? '0-3' : jxzs.xyp_cpl0019 == '2' ? '3-13' : jxzs
		.xyp_cpl0019 ==
		'3' ? '大于13' : '未命中'

	data10[3][2].value = jxzs.xyp_cpl0021 == '1' ? '0-5' : jxzs.xyp_cpl0021 == '2' ? '5-21' : jxzs
		.xyp_cpl0021 ==
		'3' ? '大于21' : '未命中'

	data10[3][3].value = jxzs.xyp_cpl0064 == '1' ? '0-5' : jxzs.xyp_cpl0064 == '2' ? '5-27' : jxzs
		.xyp_cpl0064 ==
		'3' ? '大于27' : '未命中'

	data10[3][4].value = jxzs.xyp_cpl0023 == '1' ? '0-7' : jxzs.xyp_cpl0023 == '2' ? '7-34' : jxzs
		.xyp_cpl0023 ==
		'3' ? '大于34' : '未命中'

	data10[4][1].value = jxzs.xyp_cpl0018 == '1' ? '0-3' : jxzs.xyp_cpl0018 == '2' ? '3-5' : jxzs.xyp_cpl0018 ==
		'3' ? '5-7' : jxzs.xyp_cpl0018 == '4' ? '大于7' : '未命中'

	data10[4][2].value = jxzs.xyp_cpl0020 == '1' ? '0-3' : jxzs.xyp_cpl0020 == '2' ? '3-5' : jxzs.xyp_cpl0020 ==
		'3' ? '5-15' : jxzs.xyp_cpl0020 == '4' ? '大于15' : '未命中'

	data10[4][3].value = jxzs.xyp_cpl0065 == '1' ? '0-3' : jxzs.xyp_cpl0065 == '2' ? '3-5' : jxzs.xyp_cpl0065 ==
		'3' ? '5-20' : jxzs.xyp_cpl0065 == '4' ? '大于20' : '未命中'

	data10[4][4].value = jxzs.xyp_cpl0022 == '1' ? '0-3' : jxzs.xyp_cpl0022 == '2' ? '3-5' : jxzs.xyp_cpl0022 ==
		'3' ? '5-34' : jxzs.xyp_cpl0022 == '4' ? '大于34' : '未命中'
}

export function yhyqqzfx(data) {
	const params = [
		"bank_lost",
		"bank_overdue",
		"bank_bad"
	]
	let ids = []
	for (let i = 0; i < params.length; i++) {
		let allnum = deepPd(data, ['id', params[i] + '_allnum'])
		let time = deepPd(data, ['id', params[i] + '_time'])
		// console.log('---dddd----', allnum, time)
		data101[1 + i][1].value = allnum == null ? 0 : allnum
		data101[1 + i][2].value = (time == null || time == '') ? '无' : '近' + time + '年内'
	}
}

export function wlqzslfx(data) {
	const params = [
		"nbank_lost",
		"nbank_sloan_lost",
		"nbank_nsloan_lost",
		"nbank_autofin_lost",
		"nbank_cons_lost",
		"nbank_finlea_lost",
		"nbank_other_lost"
	]
	let ids = []
	for (let i = 0; i < params.length; i++) {
		let allnum = deepPd(data, ['id', params[i] + '_allnum'])
		let time = deepPd(data, ['id', params[i] + '_time'])

		// console.log('---time---', time)
		data60[1 + i][1].value = allnum == null ? 0 : allnum
		data60[1 + i][2].value = time == null || time == '' ? '无' : '近' + time + '年内'
	}
}

export function disposeSlc(data) {
   const cell_params = [
        "bank_bad",
        "bank_overdue",
        "bank_lost",
        "nbank_bad",
        "nbank_overdue",
        "nbank_lost",
        "nbank_nsloan_bad",
        "nbank_nsloan_overdue",
        "nbank_nsloan_lost",
        "nbank_sloan_bad",
        "nbank_sloan_overdue",
        "nbank_sloan_lost",
        "nbank_cons_bad",
        "nbank_cons_overdue",
        "nbank_cons_lost",
        "nbank_finlea_bad",
        "nbank_finlea_overdue",
        "nbank_finlea_lost",
        "nbank_autofin_bad",
        "nbank_autofin_overdue",
        "nbank_autofin_lost",
        "nbank_other_bad",
        "nbank_other_overdue",
        "nbank_other_lost"
    ]
    const id_params = [
        "court_bad",
        "court_executed",
        ...cell_params
    ]
    const fxmd_params = [
        ['法院被执行人', 'court_executed'],
        ['法院失信人', 'court_bad'],
        ['非银-持牌小贷一般风险', 'nbank_sloan_overdue'],
        ['非银-持牌小贷高风险', 'nbank_sloan_lost'],
        ['非银-持牌小贷中风险', 'nbank_sloan_bad'],
        ['非银(含全部非银类型)一般风险', 'nbank_overdue'],
        ['非银-其他一般风险', 'nbank_other_overdue'],
        ['非银-其他高风险', 'nbank_other_lost'],
        ['非银-其他中风险', 'nbank_other_bad'],
        ['非银-持牌网络小贷一般风险', 'nbank_nsloan_overdue'],
        ['非银-持牌网络小贷高风险', 'nbank_nsloan_lost'],
        ['非银-持牌网络小贷中风险', 'nbank_nsloan_bad'],
        ['非银(含全部非银类型)高风险', 'nbank_lost'],
        ['非银-持牌融资租赁一般风险', 'nbank_finlea_overdue'],
        ['非银-持牌融资租赁高风险', 'nbank_finlea_lost'],
        ['非银-持牌融资租赁中风险', 'nbank_finlea_bad'],
        ['非银-持牌消费金融一般风险', 'nbank_cons_overdue'],
        ['非银-持牌消费金融高风险', 'nbank_cons_lost'],
        ['非银-持牌消费金融中风险', 'nbank_cons_bad'],
        ['非银(含全部非银类型)中风险', 'nbank_bad'],
        ['非银-持牌汽车金融一般风险', 'nbank_autofin_overdue'],
        ['非银-持牌汽车金融高风险', 'nbank_autofin_lost'],
        ['非银-持牌汽车金融中风险', 'nbank_autofin_bad'],
        ['银行(含信用卡)一般风险', 'bank_overdue'],
        ['银行(含信用卡)高风险', 'bank_lost'],
        ['银行(含信用卡)中风险', 'bank_bad']
    ]
    let cell_allnum = 0
    let id_allnum = 0
    for (let i = 0; i < cell_params.length; i++) {
        cell_allnum += (cell_params[i] in data.cell ? Number.parseInt(data.cell[cell_params[i] + '_allnum']) : 0)
    }
    for (let i = 0; i < id_params.length; i++) {
        id_allnum += (id_params[i] in data.id ? Number.parseInt(data.id[id_params[i] + '_allnum']) : 0)
    }
    let idArr = [], cellArr = []
    for (let i = 0; i < fxmd_params.length; i++) {
        let cellResult = {
            'left': '',
            'right': '未命中',
            'smallLeft': '0',
            'smallRight': '无',
            'check': false
        }
        let idResult = {
            'left': '',
            'right': '未命中',
            'smallLeft': '0',
            'smallRight': '无',
            'check': false
        }
        const item = fxmd_params[i]
        cellResult.left = idResult.left = item[0]
        if ('0' == deepPd(data, ['id', item[1]])) {
            idResult.right = '命中'
            idResult.check = true
            idResult.smallLeft = deepPd(data, ['id', item[1] + '_allnum'])
            idResult.smallRight = deepPd(data, ['id', item[1] + '_time']) + '年'
        }
        idArr.push(idResult)
        if ('0' == deepPd(data, ['cell', item[1]])) {
            if (i < 2) continue
            cellResult.right = '命中'
            cellResult.check = true
            cellResult.smallLeft = deepPd(data, ['cell', item[1] + '_allnum'])
            cellResult.smallRight = deepPd(data, ['cell', item[1] + '_time']) + '年'
        }
        if (i > 1) {
            cellArr.push(cellResult)
        }
    }
    return {
        id_allnum,
        cell_allnum,
        searchNameData: [
            idArr, cellArr
        ]
    }
}

export function disposeAls(data) {
	let params = [
		'pdl',
		'caon',
		'rel',
		'caoff',
		'cooff',
		'af',
		'coon',
		'oth',
		'bank',
		'nbank'
	]
	let time_crecle = ['d7', 'd15', 'm1', 'm3', 'm6', 'm12']
	const allnum = []
	const orgnum = []
	for (let i = 0; i < time_crecle.length; i++) {
		let allsum = 0,
			orgsum = 0
		const item = data[time_crecle[i]]
		// console.log('----item---', item)
		for (let j = 0; j < params.length; j++) {
			allsum += deepData(item, ['id', params[j], 'allnum'])
			orgsum += deepData(item, ['id', params[j], 'orgnum'])
			allsum += deepData(item, ['cell', params[j], 'allnum'])
			orgsum += deepData(item, ['cell', params[j], 'orgnum'])
		}
		allnum.push(allsum)
		orgnum.push(orgsum)
	}
	return {
		allnum,
		orgnum
	}
}

export function disposeEl(data) {
	const fyxg = []
	const fysx = []
	for (let key in data) {
		if (key.substring(0, 2) == 'sx') {
			fysx.push(data[key])
		} else if (key.substring(0, 2) == 'xg') {
			fyxg.push(data[key])
		}
	}
	return {
		fyxg,
		fysx
	}
}

function deepData(data, keys) {
	let i = 0
	while (i < keys.length) {
		if (data[keys[i]] == undefined) {
			return 0
		} else {
			data = data[keys[i]]
			i++
		}
	}
	return Number.parseInt(data)
}

function deepPd(data, keys) {
	let i = 0
	while (i < keys.length) {
		if (data[keys[i]] == undefined) {
			return null
		} else {
			data = data[keys[i]]
			i++
		}
	}
	return data
}

function transposeArray(array) {
	return array[0].map((col, i) => array.map(row => row[i]));
}

export const e3data = [
	{
		value: 10,
		name: '7天'
	},
	{
		value: 10,
		name: '30天'
	},
	{
		value: 10,
		name: '90天'
	},
	{
		value: 10,
		name: '180天'
	}
]
